﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Graficos
{
    public partial class Ventas_WinForm : Form
    {
        public Ventas_WinForm()
        {
            InitializeComponent();
        }
        
        public void PonerInfo(DataTable dt, string DescGrupo, string DescValor)
        {
            chart1.DataSource = dt;

            chart1.Series["Series1"].XValueMember = "Grupo";
            chart1.Series["Series1"].YValueMembers = "Valor";

            chart1.ChartAreas[0].Axes[0].Title = DescGrupo;
            chart1.ChartAreas[0].Axes[1].Title = DescValor;

            chart1.DataBind();
        }

        private void Ventas_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dataSet1.Fcturacion' table. You can move, or remove it, as needed.
        }

        private void button1_Click(object sender, EventArgs e)
        {

            Close();
        }
    }
}
